package book;

public class BookList {
  private Book[] books;
  private int useSize;

    public BookList() {
        this.books = new Book[10];
        this.books[0] = new Book("水浒传","施耐庵","小说",20.5);
        this.books[1] = new Book("红楼梦","曹雪芹","小说",35.5);
        this.books[2] = new Book("西游记","吴承恩","小说",18.0);
        this.useSize = 3;
    }

    public int getUseSize() {
        return useSize;
    }

    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }

    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(Book book,int pos) {
       books[pos] = book;
    }
}
